package com.os;

import java.sql.SQLOutput;

/**
 * @Author Matt
 * @Date 2022/10/9
 * @Desc:
 * @Version V1.0
 */
public class PrintableDemo {

    public static void main(String[] args) {
        usePrintable(s -> {
            System.out.println(s);
        });
        usePrintable(System.out::println);
    }

    private static void usePrintable(Printable p){
        p.printString("hello world!");
    }
}
